package thread;

/**
 * Creared with IntelliJ IDEA.
 * Description:
 * User:yxd
 * Date:2022-03-26
 * Time:23:00
 */
public class Demo18 {
    public static void main(String[] args) {
        Object o = new Object();
        synchronized (o){
            System.out.println("wait 前");
            try {
                o.wait();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("wait 后");
        }

    }
}
